# -*- coding: utf-8 -*-
import sys
reload(sys)
from outputs import *
#import ProtocolIO
import ProtocolMgr
if __name__ == "__main__":
    #ProtocolIO.readxml("haha")
    msg = CS_LoginReq.create()
    msg.nToken = 1
    msg.stBasic.sDeviceID = "你好啊"
    encodeBuffer = ProtocolMgr.encode(msg)
    print encodeBuffer
    decodeBuffer = ProtocolMgr.decode(encodeBuffer)
    print "id = {} deviceid = {}".format(decodeBuffer.nToken,decodeBuffer.stBasic.sDeviceID.encode("utf-8"))
